{"ast":null,"code":"import apiClient from \"../http\";\nimport { getChatOrNew, getChats, newMultiChat } from \"../routes\";\nexport default class ChatService {\n  static async getChatsList() {\n    return apiClient.get(getChats());\n  }\n  static async getDialogOrNew(otherUserId) {\n    return apiClient.get(getChatOrNew(otherUserId));\n  }\n  static async getNewMultiDialog(newDialog) {\n    return apiClient.post(newMultiChat(), newDialog);\n  }\n}","map":{"version":3,"names":["apiClient","getChatOrNew","getChats","newMultiChat","ChatService","getChatsList","get","getDialogOrNew","otherUserId","getNewMultiDialog","newDialog","post"],"sources":["/data/messenger.client/src/services/ChatService.ts"],"sourcesContent":["import apiClient from \"../http\";\nimport {AxiosResponse} from 'axios';\nimport {getChatOrNew, getChats, newMultiChat} from \"../routes\"\nimport {ChatsListResponse} from \"../models/response/ChatsListResponse\";\nimport {ChatsListItem} from \"../models/response/ChatsListItem\";\nimport ChatRequest from \"../models/request/ChatRequest\";\n\nexport default class ChatService {\n    public static async getChatsList(): Promise<AxiosResponse<ChatsListResponse>> {\n        return apiClient.get<ChatsListResponse>(getChats());\n    }\n\n    public static async getDialogOrNew(otherUserId: string): Promise<AxiosResponse<ChatsListItem>> {\n        return apiClient.get<ChatsListItem>(getChatOrNew(otherUserId));\n    }\n\n    public static async getNewMultiDialog(newDialog: ChatRequest): Promise<AxiosResponse<ChatsListResponse>> {\n        return apiClient.post<ChatsListResponse>(newMultiChat(), newDialog);\n    }\n}"],"mappings":"AAAA,OAAOA,SAAS,MAAM,SAAS;AAE/B,SAAQC,YAAY,EAAEC,QAAQ,EAAEC,YAAY,QAAO,WAAW;AAK9D,eAAe,MAAMC,WAAW,CAAC;EAC7B,aAAoBC,YAAY,GAA8C;IAC1E,OAAOL,SAAS,CAACM,GAAG,CAAoBJ,QAAQ,EAAE,CAAC;EACvD;EAEA,aAAoBK,cAAc,CAACC,WAAmB,EAAyC;IAC3F,OAAOR,SAAS,CAACM,GAAG,CAAgBL,YAAY,CAACO,WAAW,CAAC,CAAC;EAClE;EAEA,aAAoBC,iBAAiB,CAACC,SAAsB,EAA6C;IACrG,OAAOV,SAAS,CAACW,IAAI,CAAoBR,YAAY,EAAE,EAAEO,SAAS,CAAC;EACvE;AACJ"},"metadata":{},"sourceType":"module"}